/**
 * 
 */
package myth.cc.bean;

import java.util.Date;

/**
 * @author Biao Zhang
 *
 */
public class Label {
	/**
	 * The type of the label
	 * @author Biao Zhang
	 *
	 */
	public enum LabelType {
		Null,
		Add,
		Delete,
		Modify
	}
	
	private String author = null;
	private Date date = null;
	private String reason = null;
	private LabelType type = LabelType.Null;
	
	private int beginLine = 0;
	private int endLine = 0;
	
	/**
	 * The default constructor
	 */
	public Label() {
	}

	/**
	 * @return the author
	 */
	public String getAuthor() {
		return author;
	}

	/**
	 * @param author the author to set
	 */
	public void setAuthor(String author) {
		this.author = author;
	}

	/**
	 * @return the date
	 */
	public Date getDate() {
		return date;
	}

	/**
	 * @param date the date to set
	 */
	public void setDate(Date date) {
		this.date = date;
	}

	/**
	 * @return the reason
	 */
	public String getReason() {
		return reason;
	}

	/**
	 * @param reason the reason to set
	 */
	public void setReason(String reason) {
		this.reason = reason;
	}

	/**
	 * @return the type
	 */
	public LabelType getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(LabelType type) {
		this.type = type;
	}

	/**
	 * @return the beginLine
	 */
	public int getBeginLine() {
		return beginLine;
	}

	/**
	 * @param beginLine the beginLine to set
	 */
	public void setBeginLine(int beginLine) {
		this.beginLine = beginLine;
	}

	/**
	 * @return the endLine
	 */
	public int getEndLine() {
		return endLine;
	}

	/**
	 * @param endLine the endLine to set
	 */
	public void setEndLine(int endLine) {
		this.endLine = endLine;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return String.format("Author: %s\nDate: %s\nReason: %s", author, date, reason);
	}
	
	
}
